import { BaseEntity } from '../../base/entity/base';
import { Column, Entity, Index } from 'typeorm';

/**
 * 项目信息
 */
@Entity('project_info')
export class ProjectEntity extends BaseEntity {
    @Index()
    @Column({ comment: '项目ID' })
    id: number;

    @Column({ comment: '项目名称' })
    name: string;

    @Column({ comment: '项目描述', type: 'text', nullable: true })
    description: string;

    @Index()
    @Column({ comment: '创建者ID' })
    createUserId: number;

    @Index()
    @Column({ comment: '项目负责人ID' })
    leaderUserId: number;

    @Column({ comment: '总时长(分钟)', default: 0 })
    totalTime: number;

    @Column({ comment: '项目状态', default: 0, dict: ['进行中', '已完成'] })
    status: number;
} 